import request from '@/utils/request'

// 获取所有分类
export function getCategories() {
  return request({
    url: '/categories',
    method: 'get'
  })
}

// 根据ID获取分类详情
export function getCategoryById(id) {
  return request({
    url: `/categories/${id}`,
    method: 'get'
  })
}